package phaseI;


public class Token {

	public static char OR = '|';
	public static char UNION = '|';
	public static char OPEN_PAREN = '(';
	public static char CLOSE_PAREN = ')';
	public static char OPEN_BRACKET = '[';
	public static char CLOSE_BRACKET = ']';
	public static char STAR = '*';
	public static char PLUS = '+';
	public static char DOT = '.';
	public static char DOLLAR = '$';
	public static char DASH = '-';
	public static char EXP = '^';
	
	public static char[] SPECIAL_CHAR = {' ', '(', ')', '[', ']', '*', '+', '|', '?', '^', '"', '\\', '\''};
	public static char[] RE_char = {' ', '\\', '*', '+', '?', '|', '[', ']', '(', ')', '.', '\'', '"'};
	public static char[] CLS_char = { '\\', '^', '-', '[', ']' };
	
	public static boolean matchRE_CHAR(char c) {
		for (char ch : RE_char)
			if (c == ch)
				return true;
		return false;
	}
	
	public static boolean matchCLS_CHAR(char c) {
		for (char ch : CLS_char)
			if (c == ch)
				return true;
		return false;
	}
	
	public static boolean isSpecialChar(char c) {
		for (char ch : SPECIAL_CHAR)
			if (c == ch)
				return true;
		return false;
	}
}
